package com.imooc.service;

import com.imooc.entity.PayInfo;
import com.imooc.pojo.MallPayInfo;
import com.lly835.bestpay.enums.BestPayTypeEnum;
import com.lly835.bestpay.model.PayResponse;
import org.springframework.stereotype.Repository;

import java.math.BigDecimal;

/**
 * @Author huqian
 * @Date 2021/5/14 10:08
 * @Version 1.0
 */
@Repository
public interface IPayService {
    /**
     * 创建发起支付
     * @return
     */
   PayResponse create(String orderId, BigDecimal amount, BestPayTypeEnum bestPayTypeEnum);
    /**
     * 异步通知
     */
   String asyncNotify(String notifyData);

    /**
     * 通过订单号查询支付记录 用于前端的轮询
     * @param orderId
     * @return
     */
   MallPayInfo queryByOrderId (String orderId);

}
